import {
    SET_THEME,
    SET_USER_INFO,
} from '../constants';


const INITIAL_STATE = {
    color: 'rgb(208,45,20)',//主题色
    fontColor: '#fff',//字体色
    backgroundColor: '#fff',//背景色
    userInfo:{
        isLogin: false
    },
    loginTheme:{
        background: 'rgb(208,45,20)',
        logoColor:'rgb(215,47,21)'
    },
    isSendCode: false
}

export default function app (state = INITIAL_STATE, action) {
    switch (action.type) {
        case SET_THEME:
            return {
                ...state,
                color: action.color
            }
        case SET_USER_INFO:
            return {
                ...state,
                userInfo: action.userInfo
            }
        default:
            return state
    }
}
